<ion-header>
  <ion-navbar>
    <ion-title>Delete Items</ion-title>
  </ion-navbar>
</ion-header>
<ion-content>
  <ion-list>
    <ion-list-header>
      Swipe left to delete
      <button item-end ion-button icon-only clear (click)="addItem()">
        <ion-icon color="primary" name="add-circle"></ion-icon>
      </button>
    </ion-list-header>
    <ion-item-sliding *ngFor="let item of items; let i = index; ">
      <ion-item>
        {{item.title}}
      </ion-item>
      <ion-item-options icon-start (ionSwipe)="deleteItem(items, i)">
        <button color="danger" ion-button expandable (click)="deleteItem(items, i)">
          <ion-icon name="trash"></ion-icon>
        </button>
      </ion-item-options>
    </ion-item-sliding>
    <ion-list-header>
      Tap or swipe to delete
      <button item-end ion-button icon-only clear (click)="addThing()">
        <ion-icon color="primary" name="add-circle"></ion-icon>
      </button>
    </ion-list-header>
    <ion-item-sliding #slidingItem *ngFor="let thing of things; let i = index; ">
      <ion-item #item>
        <ion-icon item-start color="danger" name="remove-circle" (click)="openOption(slidingItem, item, $event)"></ion-icon> {{thing.title}}
      </ion-item>
      <ion-item-options icon-start (ionSwipe)="deleteItem(things, i)">
        <button color="danger" ion-button expandable (click)="deleteItem(things, i)">
          <ion-icon name="trash"></ion-icon>
        </button>
      </ion-item-options>
    </ion-item-sliding>
  </ion-list>
</ion-content>
